|
POSITION OBJECT
This command will place the specified 3D object in 3D space.
POSITION OBJECT Object Number, X, Y, Z
Object Number
Integer
The object number
X
Float
The x position value
Y
Float
The y position value
Z
Float
The z position value
This command does not return a value.
In order to see your 3D object, you must ensure the camera is pointing in the right direction and that both camera and 3D object are within 5000 units from each other. The object number should be specified using an integer value. The 3D Coordinates should be specified using real numbers.
sync on : sync rate 0 : hide mouse:cls 0
ObjectNumber=1
SecondObject=2
load object "model.x",ObjectNumber
rotate object ObjectNumber, 270, 0, 0
fix object pivot ObjectNumber
point object ObjectNumber,0,0,0
position object ObjectNumber, 0,0,0
load object "model.x",SecondObject
position object SecondObject, 0,4,0
while mouseclick()=0
if inkey$()="r" then rotate object ObjectNumber, 0,wrapvalue(object angle y(1)+1),0
if inkey$()="x" then xrotate object ObjectNumber,wrapvalue(object angle x(1)+1)
if inkey$()="y" then yrotate object ObjectNumber,wrapvalue(object angle y(1)+1)
if inkey$()="z" then zrotate object ObjectNumber,wrapvalue(object angle z(1)+1)
sync
endwhile
delete object ObjectNumber
delete object SecondObject
end
BASIC3D Commands Menu
Index
|